home *** CD-ROM | disk | FTP | other *** search
/ Chip: 2005 Utilities / CHIP Utilities 2005.7z / CHIP Utilities 2005.iso / CHIP Utilities / Zarzadzanie i bezpieczenstwo systemu / MBSA / MBSASetup-EN.msi / Data.Cab / reportdetails.xsl < prev    next >
Extensible Markup Language  |  2004-08-13  |  4KB  |  88 lines

  1. <?xml version="1.0"?> 
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3.     
  4.     <xsl:variable name="CheckID" select="'CheckIDHere'"></xsl:variable>
  5.  
  6.     <xsl:variable name="ScoreLookup">
  7.       <c score="0" url="Graphics/dash.gif" alttext="Check Not Performed"/>
  8.       <c score="1" url="Graphics/excl_red.gif" alttext="Unable to scan"/>
  9.       <c score="2" url="Graphics/x_red.gif" alttext="Check failed (critical)"/>
  10.       <c score="3" url="Graphics/x_gold.gif" alttext="Check failed (non-critical)"/>
  11.       <c score="4" url="Graphics/astrx.gif" alttext="Best practice"/>
  12.       <c score="5" url="Graphics/chek_grn.gif" alttext="Check passed"/>
  13.       <c score="7" url="Graphics/info.gif" alttext="Additional information"/>
  14.     </xsl:variable>
  15.     
  16.     <xsl:template match="SecScan">
  17.         
  18.             <h1><xsl:value-of select="Check[@ID=$CheckID]/Advice"/></h1>
  19.             <h2>Result Details<br /><br /><xsl:value-of select="Check[@ID=$CheckID]/Detail/@text"/></h2>
  20.             <table id="TableID" width="100%" border="0" cellpadding="0" cellspacing="0" style="border: solid 1px #000000; padding-left: 10px; padding-right: 10px;">
  21.             <tr class="DetailHeader" >
  22.                 <td style="width:40" align="center" valign="middle"><nobr>  Score  </nobr></td>
  23.                 <xsl:for-each select="Check[@ID=$CheckID]/Detail/Head/Col">
  24.                     <td nowrap="nowrap">
  25.                         <xsl:value-of select="."/> 
  26.                     </td>
  27.                 </xsl:for-each>
  28.             </tr>
  29.             
  30.             <xsl:for-each select="Check[@ID=$CheckID]/Detail">
  31.                 <xsl:apply-templates select="Row[Col/@global='true']">
  32.                 </xsl:apply-templates>
  33.                 <xsl:apply-templates select="Row[not(Col/@global='true')]">
  34.                 </xsl:apply-templates>
  35.             </xsl:for-each>
  36.             </table>
  37.  
  38.             <xsl:if test="$CheckID = '178' and count(Check[@ID=$CheckID]/Detail/Row/Col[@changed='true']) > 0">
  39.                 <p>* This setting is affected by the overall state or settings of the firewall.</p>
  40.             </xsl:if>
  41.     </xsl:template>
  42.  
  43.     <xsl:template match="Row">
  44.     <xsl:param name="score" select="@Grade"/>
  45.         <tr>
  46.             <td valign="top" align="center">
  47.                 <xsl:choose>
  48.                   <xsl:when test="../../@ID='121'">
  49.                     <img alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@url}" />
  50.                   </xsl:when>
  51.                   <xsl:when test="../../@ID='10121'">
  52.                     <img alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@url}" />
  53.                   </xsl:when>
  54.                   <xsl:when test="../../@ID='178' or ../../@ID='10178' or ../../@ID='20178'">
  55.                     <xsl:choose>
  56.                       <xsl:when test="@Grade='0'">
  57.                         <IMG alt="" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=$score]/@url}" />
  58.                       </xsl:when>
  59.                       <xsl:when test="@Grade='4'">
  60.                         <img alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@url}" />
  61.                       </xsl:when>
  62.                       <xsl:otherwise>
  63.                         <IMG alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=$score]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=$score]/@url}" />
  64.                       </xsl:otherwise>
  65.                     </xsl:choose>
  66.                   </xsl:when>
  67.                   <xsl:otherwise>
  68.                     <IMG alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=$score]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=$score]/@url}" />
  69.                   </xsl:otherwise>
  70.                 </xsl:choose>    
  71.             </td>
  72.             <xsl:for-each select="Col">
  73.             <td valign="top">
  74.              <xsl:choose>
  75.               <xsl:when test="@URL and @URL != '' and @URL != ' '">
  76.                 <A target="_blank" href="{@URL}"><xsl:value-of select="."/></A>
  77.               </xsl:when>
  78.               <xsl:otherwise>
  79.                 <xsl:value-of select="."/>
  80.               </xsl:otherwise>
  81.             </xsl:choose>    
  82.             </td>
  83.             </xsl:for-each>
  84.         </tr>
  85.     </xsl:template>
  86.     
  87. </xsl:stylesheet>
  88.